from django.conf.urls.defaults import *
from django.views.generic.base import TemplateView
#from asset.models import Market
from jrcmodel.models import Market, CST
#from test.views import TestDeleteView
from django.views.generic.edit import DeleteView
import django
import os
from settings import TEMPLATE_DIRS
from django.contrib import messages
from django.views.generic.detail import DetailView
from django.template.context import RequestContext
from test.views import PortfolioDetailView, CstForPortfolioDetailView,\
    UidDetailView, ListSignalsView, VersionView
from jrcconfig.models import JrcConfig
from ittctalk.models import IttcTalk
from django.views.generic.list import ListView
#from test.models import Girl
from django.core.signals import request_finished


urlpatterns = patterns(
	"test.views"
    , (r"^$", "start")
    , (r"^message/$", "message")
    , (r"^message/list/$", "message_list")
	, (r"^create_all/$", 'create_all')
    , (r"^test/$", "test")
	, (r"^(?P<id>\d+)/parse_xml/$", "parse_xml")
	, (r"^(?P<id>\d+)/parse_csv/$", "parse_csv")
	, (r"^csv/$", "parse_csv")

    , (r"^import/$", "import_from_text")
    , (r"^sql/$", "test_sql")
    , (r"^tz/", "timezone")

    , (r"^permissions/$", "permissions")
    , (r"^permissions/(?P<pk>\d+)/$", "editpermissions")
    , (r"^getjrcpermissions/(?P<pk>\d+)/$", "getjrcpermissions")
    
    , (r"^uploadsignals/(?P<pk>\d+)/", "upload_signals")
    , (r"^signals/(?P<pk>\d+)/", ListSignalsView.as_view())
    , (r"^getuid/(?P<uid>\w{3})", UidDetailView.as_view())
    
    , (r"^readurl/$", "readurl")
    
    # Testing for generic
#    , (r"girls/$", ListView.as_view(model = Girl))

    # Menu
    , (r"^start/$", "start")
    , (r"^portfolio/$", "portfolio")
    , (r"^trading/$", "trading")
    , (r"^development/$", "development")
    , (r"^program/$", "program")
    
    # Test
    , (r"^portfoliowithcst/(?P<pk>\d+)/$", PortfolioDetailView.as_view())
#    , (r"^getcstforport/(?P<pk>\d+)/(?P<month>\d+)/$", CstForPortfolioDetailView.as_view())
    , (r"^getcstforport/(?P<pk>\d+)/$", CstForPortfolioDetailView.as_view())

    , (r"^heading/$", "heading")
    , (r"^myform/$", TemplateView.as_view(template_name = "test/myform.html"))
    , (r"^(?P<pk>\d+)/delete/$", DeleteView.as_view(model = Market, template_name = "test/delete.html"))
    , (r"^version/$", VersionView.as_view())


    # Move to asset/markets application
    #, (r"^(?P<id>\d+)/getassetmarkets/$", "django.views.generic.list_detail.object_list", dict(info_dict, template_name = "asset/getmarkets.html"))
    , (r"^(?P<id>\d+)/getassetmarkets/$", "getassetmarkets")
    , (r"^(?P<page>\d+)/getparameterbypage/$", "getparameterbypage")

)
